home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / doslynx / src / tform.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  1.2 KB  |  45 lines

  1. //    Copyright (c) 1994, University of Kansas, All Rights Reserved
  2. //
  3. //    Class:        TForm
  4. //    Include File:    tform.h
  5. //    Purpose:    Implement a form class for HTML+
  6. //    Remarks/Portability/Dependencies/Restrictions:
  7. //    Revision History:
  8. //        04-25-94    created
  9. #include"globals.h"
  10. #include"tform.h"
  11. #include<string.h>
  12.  
  13. TForm::TForm(const char *cp_action, const char *cp_method)    {
  14. //    Purpose:    Creation of a Form object.
  15. //    Arguments:    cp_action    The address of the action server.
  16. //            cp_method    The method to send information to the
  17. //                    server.
  18. //    Remarks/Portability/Dependencies/Restrictions:
  19. //        ENCTYPE not supported.
  20. //    Revision History:
  21. //        04-25-94    created
  22.  
  23.     //    Set relevant members to initial values.
  24.     cp_ActionServer = NULL;
  25.     m_SendAs = get;
  26.  
  27.     //    Determine values by arguments.
  28.     //    First the action server.
  29.     if(cp_action != NULL)    {
  30.         cp_ActionServer = newStr(cp_action);
  31.     }
  32.     else    {
  33.         //    Try to use the current document address from the
  34.         //    current view.  This should be safe since this
  35.         //    should never be executed unless a view is being
  36.         //    created and it knows it's own URL.
  37.         cp_ActionServer = newStr(TURLV_current->getURL());
  38.     }
  39.  
  40.     if(cp_method != NULL)    {
  41.         if(stricmp(cp_method, "post") == 0)    {
  42.             m_SendAs = post;
  43.         }
  44.     }
  45. }